﻿CREATE TABLE [dbo].[tblReportAccess] (
    [ReportAccessID] INT           IDENTITY (1, 1) NOT NULL,
    [ReportID]       INT           NULL,
    [SqlEnd]         DATETIME      NULL,
    [ReportStart]    DATETIME      NULL,
    [ReportEnd]      DATETIME      NULL,
    [UserName]       VARCHAR (20)  NULL,
    [Parms]          VARCHAR (100) NULL
);
GO
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Unique id', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportAccess',
	@level2type = N'COLUMN', @level2name = N'ReportAccessID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Report ID of the report accessed', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportAccess',
	@level2type = N'COLUMN', @level2name = N'ReportID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The sql used to access the report', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportAccess',
	@level2type = N'COLUMN', @level2name = N'SqlEnd';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Report start time', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportAccess',
	@level2type = N'COLUMN', @level2name = N'ReportStart';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Report end time', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportAccess',
	@level2type = N'COLUMN', @level2name = N'ReportEnd';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The user who accessed the report', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportAccess',
	@level2type = N'COLUMN', @level2name = N'UserName';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The parameters passed to the report', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportAccess',
	@level2type = N'COLUMN', @level2name = N'Parms';

